<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 将data中的数据的key按照改为指定的英文 
        // 思考如何将data中数据转化为最终输出的结果
        const data = [
            {
                入职日期: 44505,
                姓名: "小张",
                工号: "9002",
                手机号: "13800000252",
                转正日期: 44892,
                部门: "总裁办"
            },
            {
                入职日期: 44506,
                姓名: "小李",
                工号: 9006,
                手机号: "13810000512",
                转正日期: 44893,
                部门: "总裁办",
            }

        ]
        // result = [
        // {
        //     timeOfEntry:44505,
        //     mobile: "13800000252",
        //     username:"小张",
        //     correctionTime:  44892,
        //     workNumber: "9002",
        //     departmentName:"总裁办"
        // }
        // ]
        const mapInfo = {
            '入职日期': 'timeOfEntry',
            '手机号': 'mobile',
            '姓名': 'username',
            '转正日期': 'correctionTime',
            '工号': 'workNumber',
            '部门': 'departmentName',

        }

        const result = data.map(item => {
            const zhkeys = Object.keys(item)
            console.log(zhkeys, '----------');
            const enkeyObj = {}
              zhkeys.forEach(zhkey => {
            //    console.log(mapInfo[zhkey],'-------------') 
            const enkey = mapInfo[zhkey]
                enkeyObj[enkey] = item[zhkey]

            })
            return enkeyObj
        })


        console.log(result, 'result');
    </script>
</head>

<body>

</body>

</html>